//
//  HomePageViewController.m
//  拉勾7.17
//
//  Created by dllo on 16/7/19.
//  Copyright © 2016年 YMJ. All rights reserved.
//

#import "HomePageViewController.h"
#import "HomePageTableViewCell.h"

@interface HomePageViewController ()

@end

@implementation HomePageViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.tableView_HomePage = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, WIDTH, HEIGHT) style:UITableViewStylePlain];

    [self.view addSubview:_tableView_HomePage];
    self.tableView_HomePage.delegate = self;
    self.tableView_HomePage.dataSource = self;
    self.tableView_HomePage.rowHeight = 150;
    // 头视图
    // 轮播图
    self.imageArray = [NSMutableArray arrayWithObjects:@"01", @"02", @"03", @"04", @"05", @"06", @"07", @"08", nil];
    
    CarouseFigure *carouseFigure = [CarouseFigure creatCarouseFigureWithFrame:CGRectMake(0, 0, WIDTH, WIDTH * 0.618) imageArray:_imageArray];
    [self.view addSubview:carouseFigure];
     self.tableView_HomePage.tableHeaderView = carouseFigure;
    // 搜索工作searchBar
    self.searchJobBar = [[UISearchBar alloc] initWithFrame:CGRectMake(0, 8, WIDTH, 44)];
    [self.head_backgroundView addSubview:_searchJobBar];
    // 自定义searchBar


}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return 10;
    
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    static NSString *reuse = @"reuse";
    HomePageTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:reuse];
    if (cell == nil) {
        cell = [[HomePageTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:reuse];
    }
    cell.backgroundColor = [UIColor colorWithRed:195/255.0 green:175/255.0 blue:226/255.0 alpha:100];
    // 修改cell的selectionStyle
    cell.selectionStyle = UITableViewCellSelectionStyleNone;
    return cell;
    
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
